<?php
use_helper('sfAsset');
use_helper('Text');
?>

<?php $imagesAttributes = Utils::getImageSize($currentEvent['sfAsset'][ 'Folder' ][ 'relative_path' ], $currentEvent['sfAsset'], 375, null); ?>

<?php include_partial('back/show', array('uri' => '@localized_homepage')); ?>
<h1 class="title"><?php echo truncate_text($currentEvent->getTitle(), 70, '...') ?></h1>
<div class="content-news">
    <?php if(!empty($imagesAttributes['large']['width']) && !empty($imagesAttributes['large']['height'])){ ?>
    <div class="thumb">
        <a style="margin-top: <?php echo $imagesAttributes['large']['marginTop'] ?>px" class="lightbox" href="<?php echo $imagesAttributes['large']['url'] ?>" title="<?php echo $currentEvent->getTitle() ?>">
            <?php echo image_tag($imagesAttributes['large']['url'], array('title' => $currentEvent->getTitle(), 'alt' => $currentEvent->getTitle(), 'width' => $imagesAttributes['large']['width'], 'height' => $imagesAttributes['large']['height'])) ?>
        </a>
    </div>
    <?php }?>
    <div class='description'><?php echo $currentEvent->getText(ESC_RAW) ?></div>
</div>
<?php include_partial('facebook/like') ?>
<?php include_component('event', 'listEvents', array('idCurrentEvent' => $currentEvent->getId())); ?>
<?php include_component('comment', 'list', array('object' => $currentEvent, 'i' => 0)) ?>